package main

import (
	"fmt"
	"sail/classpath"
)

func testClassPath() {
	opt := &classpath.CpOption{
		SitePathOption: "./cptest/site/",
		XpathOption:    "./cptest/basic/",
		UserClassPath:  "./cptest/user/",
	}

	cp, err := classpath.GetClasspathByCmdOption(opt)
	if err != nil {
		panic(err)
	}

	fmt.Println(cp.String())

	data, entry, err := cp.FindAndReadClass("_basic")
	if err != nil {
		panic(err)
	}

	fmt.Println(data)
	fmt.Println(entry.String())
}
